import http from '../index.js';
import config from '../config.js';



//用户登录
export const login = (data) => {
    return http.post('/api/login',data)
};

//用户信息
export const user_info = (data) => {
    return http.get('/api/user/info',data)
};

//修改用户信息
export const user_setInfo = (data) => {
    return http.post('/api/user/setInfo',data)
};

//虚拟订单列表
export const vrOrder_list = (data) => {
    return http.get('/api/vrOrder/index',data)
};

//虚拟订单详情
export const vrOrder_info = (data) => {
    return http.get('/api/vrOrder/info',data)
};

//虚拟订单兑换码兑换
export const vrOrder_exchange = (data) => {
    return http.post('/api/vrOrder/exchange',data)
};

//自提订单核销码核销
export const order_exchange = (data) => {
    return http.post('/api/order/exchange',data)
};

//订单列表
export const order_list = (data) => {
    return http.get('/api/order/index',data)
};

//订单详情
export const order_info = (data) => {
    return http.get('/api/order/info',data)
};

//商品列表
export const goods_list = (data) => {
    return http.get('/api/goods/index',data)
};

//商品分类
export const goods_category = (data) => {
    return http.get('/api/goods/category',data)
};
//发送验证码
export const getCode = (data) => {
	let obj = {
		g: 'shop',
		c: 'publics',
		a: 'send_vcode',
		i: 1,
		is_api: 1,
		client_type: 'wap',
	};
    return http.get('/front.php',{...obj,...data},'https://www.jiumeifu.cc')
};

//首页
export const analys = (data) => {
    return http.get('/api/index/analys',data)
};

//线下买单列表
export const LocalOrder = (data) => {
    return http.get('/api/LocalOrder/index',data)
};


//退款订单列表

export const refund = (data) => {
    return http.get('/api/order/refund',data)
};


//资金流水
export const finance = (data) => {
    return http.get('/api/finance/index',data)
};


//云库存列表
export const inventory = (data) => {
    return http.get('/api/goods/inventory',data)
};

//库存管理
export const storage = (data) => {
    return http.post('/api/goods/storage',data)
};

//商家列表
export const seller_list = (data) => {
    return http.post('/api/goods/seller_list',data)
};

//商品详情
export const detail = (data) => {
    return http.post('/api/goods/detail',data)
};
